main() {
  print(getUserInfo('赵'));
  print(getUserInfo(1));
  print(getUserInfo(['赵', 19, '男']));


  print('-----------');


  MyList myList = new MyList();
  myList.setValue('xx');
  print(myList.getValue());
  myList.setValue(12);
  print(myList.getValue());

  print('-----------');

  MyList<String> myList2 = new MyList<String>();//限定泛型
  myList2.setValue('天天');
  print(myList2.getValue());
}

T getUserInfo<T>(T name) {
  return name;
}

class MyList<T> {
  T? t;

  setValue(T t) {
    this.t = t;
  }

  T? getValue() {
    return t;
  }
}
